#include <iostream>
#include <ctime>

#include <math.h>
#define _USE_MATH_DEFINES

using namespace std;

// Eigen 核心部分
#include <Eigen/Core>
// 稠密矩阵的代数运算（逆，特征值等）
#include <Eigen/Dense>

using namespace Eigen;

int main(int argc, char **argv) {
     
     Matrix3d rotMatrix;
     Vector3d vectorBefore(1, 0, 0);
     Vector3d vectorAfter(0, 0, 1);
 
     rotMatrix = Eigen::Quaterniond::FromTwoVectors(vectorBefore, vectorAfter).toRotationMatrix();

     cout << rotMatrix << endl;

     Eigen::Vector3d axi1Before(2, 0, 0);
     Eigen::Vector3d axi1After(0, 0, 0);
     axi1After = rotMatrix * axi1Before;

     cout << axi1After << endl;

     return 0;
}